<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增新闻具体内容')" />
    <th:block th:include="include :: summernote-css" />
</head>
<style>
    .subject {
        -moz-box-shadow: 0 0 10px #dcdcdc;
        -webkit-box-shadow: 0 0 10px #dcdcdc;
        box-shadow: 0 0 10px #dcdcdc;
    }
    .accessory {
        -moz-box-shadow: 0 0 10px #dcdcdc;
        -webkit-box-shadow: 0 0 10px #dcdcdc;
        box-shadow: 0 0 10px #dcdcdc;
    }
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <br>
    <div class="row" style="text-align: center">
        <h2 th:text="${websiteContent.contentName}"></h2>
    </div>
    <br>
    <br>
    <div class="row">
        <div class="col-xs-3" style="height: 10px"></div>
        <div class="col-xs-6 subject" id="subject" >

        </div>
        <div class="col-xs-3" style="height: 10px"></div>
    </div>
    <br>
    <input type="hidden" th:value="${websiteContent.contentSubject}" name="contentSubject" id="contentSubject"/>
    <input type="hidden" th:value="${websiteContent.accessorys}" name="accessorys" id="accessorys">
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script type="text/javascript">

    var prefix = ctx + "system/content/download?resource=";

     $(function () {
         $("#subject").html($("#contentSubject").val())
         /**
          * 获取附件列表
          */
         var accessorys = $("#accessorys").val()
         var array = new Array();
         array = accessorys.split(";")
         var html = "<br>";
         for(var i=0;i<array.length;i++){
             var array1 = new Array();
             var array1 = array[i].split(":");
             html += "<a href="+prefix + array1[1]+">"+array1[0]+"</a><br>"
         }
         if(accessorys.length!=0){
             $("#subject").append("<p id=\"accessory\" style=\"background: rgb(239, 239, 239); padding: 15px; margin-top: 20px;\">"+"附件："+html+"</p>")
         }
     })
</script>
</body>
</html>